package com.woniuxy.sale.testRabbitMQ;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author: CHL  <br/>
 * @ToDo: 打包生产者
 * Date: 2022/4/28:16:57  <br/>
 * Description:
 */
@Component
public class PackingListProducer {
    @Resource
    AmqpTemplate amqpTemplate;

    public void send(String msg,String routingKey){
        amqpTemplate.convertAndSend("direct_exchange_packing",routingKey,msg);
    }
}
